﻿var adRWidth = 116;
var adLWidth = 1000;
$(document).ready(function () {
    var $container = $(".container");
    $container.wtRotator({
        width: 1000,
        height: 364,
        button_width: 10,
        button_height: 10,
        button_margin: 5,
        auto_start: true,
        delay: 6000,
        transition: "random",
        transition_speed: 800,
        block_size: 75,
        vert_size: 55,
        horz_size: 50,
        cpanel_align: "BC",
        timer_align: "bottom",
        display_thumbs: true,
        display_dbuttons: false,
        display_playbutton: false,
        tooltip_type: "image",
        display_numbers: false,
        display_timer: true,
        mouseover_pause: false,
        cpanel_mouseover: true,
        text_mouseover: true,
        text_effect: "fade",
        text_sync: true,
        shuffle: true,
        block_delay: 25,
        vstripe_delay: 73,
        hstripe_delay: 183
    });

    $(".number").keydown(function (event) {
        // Allow only backspace and delete
        if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 190) {
            // let it happen, don't do anything
        }
        else {
            // Ensure that it is a number and stop the keypress
            if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105)) {
                event.preventDefault();
            }
        }
    });
});
